import request from '@/router/axios';

export const getWorkOrderList = (params) => {
    return request({
        url: '/api/mes-cloud/workorder/work-order-info',
        method: 'get',
        params: params
    });
};

//根据工单号查询发货信息
export const getShipListByWorkOrderNo = (workOrderNo) => {
    return request({
        url: ` /api/mes-cloud/sheetheader/sheet-details/dilivery?workOrderNo=${workOrderNo}`,
        method: 'get'
    });
};

//根据工单号查询领料信息
export const getPickingListByWorkOrderNo = (workOrderNo) => {
    return request({
        url: ` /api/mes-cloud/sheetheader/sheet-details/master?workOrderNo=${workOrderNo}`,
        method: 'get'
    });
};



//根据工单号查询产品信息进行分页
export const getProductByWorkOrderNoList = (current, size, params) => {
    return request({
        url: '/api/mes-cloud/product/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

//根据工单号查询过站信息进行分页
export const getStationInfoByWorkOrderNoList = (current, size, params) => {
    return request({
        url: '/api/mes-cloud/workorder-station/work-order-station-info',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}